<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>箭头函数</title>
   </head>
   <body>
      <script>
         let fn = (...arr) => {
            let sum = 0;
            for (let i = 0; i < arr.length; i++) {
               sum += arr[i];
            }
            return sum;
         }
         console.log(fn(1, 2, 3, 4, 5))

         let fo = a => a * 2
         console.log(fo(2))

         let f1 = (uname) => ({name: uname})
         console.log(f1('zhangsan'))

         const [a, b, c] = [1, 2, 3]
         console.log(a, b, c)
      </script>
   </body>
</html>